package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.TWeeklySm2RosRptModel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by HangLiu on 2016/12/8.
 */
@Transactional
public interface TWeeklySm2RosRptRepository extends JpaRepository<TWeeklySm2RosRptModel, Integer>, JpaSpecificationExecutor<TWeeklySm2RosRptModel> {
    @Modifying
    @Query("delete from TWeeklySm2RosRptModel u  WHERE u.updateDate=?1")
    void deleteByDate(String  date);
}
